﻿<html>

	<head>
		<title>店铺管理</title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<link href="../../css/dialog.css" rel="stylesheet">
		<link href="../../css/skin/default/style.css" rel="stylesheet" type="text/css" />
		<link href="../../js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />

		<script src="../../js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerPopupEdit.js"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>

		<script src="../../js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
		<script type="text/javascript" src="../../js/JScripts/kindeditor/kindeditor-all.js"></script>
		<script type="text/javascript" src="../../js/JScripts/kindeditor/lang/zh_CN.js"></script>

		<script src="../../js/lib/json2.js" type="text/javascript"></script>
		<script src="../../js/lib/jquery.form.js" type="text/javascript"></script>
		<script src="../../js/JS/Pinyin.js" type="text/javascript"></script>
		<script src="../../js/JS/layout.js" type="text/javascript"></script>
		<script type="text/javascript" src="../../js/lhgdialog/lhgdialog.js?skin=idialog"></script>
		<script src="../../js/dialog.js"></script>
		<script src="../../js/constants.js" type="text/javascript"></script>
		<script src="../../js/api.js" type="text/javascript"></script>

		<script type="text/javascript" src='../../js/plupload/plupload.full.min.js'></script>
		<script src="https://cdn.bootcss.com/json3/3.3.2/json3.min.js"></script>

		<script src="../../js/qiulib/qiniu.min.js"></script>
		<style>
			.strr {
				padding: 10px;
				width: 90%;
				font-size: 13px;
				color: #666;
				background: #FAFAFA;
				margin-top: 10px;
				padding: 10px 0;
				border: 1px solid #e1e1e1;
				background: #FAFAFA;
				-moz-border-radius: 5px;
				-webkit-border-radius: 5x;
				border-radius: 5px;
				display: none;
			}
			
			a:hover {
				cursor: pointer;
			}
		</style>
		<script type="text/javascript">
			var token = $api.getStorage("token");
			$(function() {
				$("form").ligerForm();
				initContorl();

				var url = BaseUrl + "Store?token=" + $api.getStorage("token");
				$api.ajaxget(url, {}, function(data) {
					initView(data);
				});

			});

			//////////////////////////////////////////////////////////

			function initContorl() {
				$("#Ftitle").ligerGetTextBoxManager().setDisabled();
				$("#Fstorecode").ligerGetTextBoxManager().setDisabled();
		 
			}

			function initView(data) {
				var hedn = data.Store.Fhaoend;
				if(!$api.isEmpty(hedn))
					data.Store.Fhaoend = hedn.replace("T00:00:00", "");
				$api.loadJsonToForm(data.Store); 
				$(".back").css("display", "block");
				$(".rule-multi-radio").ruleMultiRadio();
			}

			function doSaveInfo() {

				if(!$("#Ftitle").val()) {
					$.ligerDialog.warn('名称不能为空');
					return;
				}

				var liense = $("#imgLiense").attr("src");

				var ret = $("form").serializeObject();
 

				var url = BaseUrl + "Store?token=" + token;
				$api.ajaxapp2(url, ret, function(data) {
					$api.showLToast("保存成功", 3000);
				});
			} 
		</script>
	</head>

	<body class="mainbody">
		<form>
			<!--导航栏-->
			<div class="location" width="300px">
				<table>
					<tr>
						<td>
							<span style="margin-left:10px">信息设置</span>
						</td>
					</tr>
				</table>
			</div>
			<div class="line10"></div>
			<div class="div-content">
				<div class="divhead">基本信息</div>
				<hr class="divline" />
				<dl>
					<dt>名称</dt>
					<dd>
						<div style="float:left">
							<input type="text" id="Ftitle" name="Ftitle" placeholder='必填' ltype="text" ligerui="{width:320}" validate="{required:true,minlength:4,disabled:true}" />
						</div>
					</dd>
				</dl>
				<dl>
					<dt>商户号</dt>
					<dd>
						<div style="float:left">
							<input type="text" id="Fstorecode" name="Fstorecode" ltype="text" placeholder='必填' ligerui="{width:180}" validate="{required:true,length:18}" />
						</div>
					</dd>
				</dl>
				<dl>
					<dt>联系人</dt>
					<dd>
						<input type="text" id="Fcontact" name="Fcontact" ltype="text" placeholder='选填' ligerui="{width:180}" />
					</dd>
				</dl>
				<dl>
					<dt>联系电话</dt>
					<dd>
						<input type="text" id="Fmobile" name="Fmobile" ltype="text" placeholder='选填'  />
					</dd>
				</dl>
				<dl>
					<dt>备用电话</dt>
					<dd>
						<input type="text" id="Fmobile2" name="Fmobile2" ltype="text" placeholder='选填'  />
					</dd>
				</dl>
			</div>

			 

			<div align="center" style="margin:20px;">
				<div style="margin-top:20px">

					<input style="margin-left:20px;width:150px;display:inline" type="button" ID="btnAduit" value="保存" class="btn yellow" onclick="doSaveInfo();" />

				</div>
			</div>

		</form>
	</body>

</html>